/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tpdisenio2009.utils;

import java.util.regex.Pattern;

/**
 *
 * @author DeuterioX
 */
public class ValidationUtils {

    public static boolean validateEmail( String email ) {
        return Pattern.matches("^[A-Za-z0-9.%]+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,4}$", email);
    }

    public static boolean validateFantasyTeam( String nameFantasyTeam ) {
        return Pattern.matches("[A-Za-z]*+[A-Za-z0-9]*", nameFantasyTeam);
    }

    public static boolean validateNumberAndLetters( String string ) {
        return Pattern.matches("^[A-Za-z0-9]*$", string);
    }

    public static boolean validateNumber( String number ) {
        return Pattern.matches("^\\d*$", number);
    }
}
